﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ApartmentSale
{
    public class DepositView
    {
        public int deposit_id { get; set; }
        public int deposit_status { get; set; }
        public int receipt_id { get; set; }
        public string receipt_code { get; set; }
        public string deposit_apartment_code { get; set; }
        public double deposit_amount { get; set; }
        public string deposit_custom_name { get; set; }
        public string deposit_custom_contact { get; set; }
        public DateTime deposit_create_date { get; set; }
        public int apartment_id { get; set; }

        public string status_string
        {
            get
            {
                switch (deposit_status)
                {
                    case 0:
                        return "Normal";
                    case 1:
                        return "Cancel out";
                    case 2:
                        return "Return";
                    case 3:
                        return "Invalid";
                }
                return "Unknown";
            }
        }

        public string date_string
        {
            get
            {
                return deposit_create_date.ToShortDateString();
            }
        }

        public override string ToString()
        {
            return receipt_code;
        }
    }
}
